Skip to content

Fix Prometheus metric naming, security, and documentation issues#259

Merged
YaroShkvorets merged 4 commits intoadd-clickhouse-rpc-metricsfrom
copilot/sub-pr-257-again
Feb 3, 2026
Merged

Fix Prometheus metric naming, security, and documentation issues#259
YaroShkvorets merged 4 commits intoadd-clickhouse-rpc-metricsfrom
copilot/sub-pr-257-again

Conversation

Copy link
Contributor

Copilot AI commented Feb 3, 2026

  • Rename histogram metrics to include _seconds suffix for Prometheus conventions
    • Rename scraper_clickhouse_operations to scraper_clickhouse_operations_seconds
    • Rename scraper_rpc_requests to scraper_rpc_requests_seconds
    • Update README.md with new metric names
  • Fix JSDoc comments for trackClickHouseOperation and trackRpcRequest functions
  • Add test coverage for histogram helper functions
  • Fix security issue: sanitize config info labels to avoid leaking credentials
  • Fix stale config values by reading from process.env at runtime
  • Address code review feedback: improve JSDoc and simplify fallback pattern
  • Change node_url_configured from boolean to sanitized node_host

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 3, 2026 19:01
…dd tests

Co-authored-by: YaroShkvorets <29608734+YaroShkvorets@users.noreply.github.com>
Co-authored-by: YaroShkvorets <29608734+YaroShkvorets@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Prometheus metrics tracking for ClickHouse and RPC operations Fix Prometheus metric naming, security, and documentation issues Feb 3, 2026
Copilot AI requested a review from YaroShkvorets February 3, 2026 19:04
Copy link
Member

@YaroShkvorets YaroShkvorets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot We still want to include RPC url, not just true/false.
Just do sanitizeUrl() for it similar to clickhouse

Co-authored-by: YaroShkvorets <29608734+YaroShkvorets@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 3, 2026

@copilot We still want to include RPC url, not just true/false.
Just do sanitizeUrl() for it similar to clickhouse

Changed in commit 39b68b1. The node_url_configured label is now node_host and uses sanitizeUrl() to extract just the hostname, matching the approach used for clickhouse_host.

@YaroShkvorets YaroShkvorets marked this pull request as ready for review February 3, 2026 19:08
@YaroShkvorets YaroShkvorets merged commit 8c0bfc0 into add-clickhouse-rpc-metrics Feb 3, 2026
Copilot AI requested a review from YaroShkvorets February 3, 2026 19:08
Copilot stopped work on behalf of YaroShkvorets due to an error February 3, 2026 19:08
YaroShkvorets added a commit that referenced this pull request Feb 3, 2026
* Add Prometheus metrics tracking for ClickHouse and RPC operations

* adjust buckets

* Update README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix Prometheus metric naming, security, and documentation issues (#259)

* Initial plan

* Address PR review comments: fix metric naming, JSDoc, security, and add tests

Co-authored-by: YaroShkvorets <29608734+YaroShkvorets@users.noreply.github.com>

* Improve JSDoc clarity and simplify fallback pattern

Co-authored-by: YaroShkvorets <29608734+YaroShkvorets@users.noreply.github.com>

* Use sanitized node_host instead of boolean node_url_configured

Co-authored-by: YaroShkvorets <29608734+YaroShkvorets@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: YaroShkvorets <29608734+YaroShkvorets@users.noreply.github.com>

* Fix Prometheus server state leak on startup failure (#261)

* Initial plan

* Fix Prometheus test failures by cleaning up server state on error

Co-authored-by: YaroShkvorets <29608734+YaroShkvorets@users.noreply.github.com>

* use bun sleep

* lint

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: YaroShkvorets <29608734+YaroShkvorets@users.noreply.github.com>
Co-authored-by: YaroShkvorets <shkvorets@gmail.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: YaroShkvorets <29608734+YaroShkvorets@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants